The Official Ubuntu Server Book (3rd Edition) by Rankin Kyle & Hill Benjamin Mako

The Official Ubuntu Server Book (3rd Edition) by Rankin Kyle & Hill Benjamin Mako

Author:Rankin, Kyle & Hill, Benjamin Mako [Rankin, Kyle]
Language: eng
Format: epub, pdf
Publisher: Pearson Education
Published: 2013-07-12T00:00:00+00:00


Restore MySQL Backups

A backup isn’t much use if you can’t restore from it. To restore a backup on MySQL, use the mysql command-line tool and point it at your backup. For instance, to back up the test database to test_backup.sql, you would type

$ mysql test < test_backup.sql

If instead you were backing up a number of databases, just type

$ mysql < multiple_database_backup.sql

To restore all databases, you need to log in as the root user. Of course, you are a secure MySQL administrator and have set a root password, so you must use the -p option (unless you set up a .my.cnf file, in which case you can leave out -p):

$ mysql -u root -p < all_databases.sql



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.